<template>
  <div id="logo">
    <div class="container">
      <svg width="700" height="250" class="text">
        <defs>
          <linearGradient id="geekColor" gradientTransform="rotate(90)">
            <stop offset="0%" stop-color="#91bd3a"></stop>
            <!-- //渐变动画 -->
            <animate
              attributeName="stop-color"
              values="#91bd3a;#12cad6;#91bd3a"
              dur="10s"
              begin="3s"
              repeatCount="indefinite"
            ></animate>
            <stop offset="100%" stop-color="#12cad6"></stop>
          </linearGradient>
        </defs>
        <text class="logo_text" x="100" y="100">TTZXH的博客</text>
        <text class="logo_text" x="100" y="200">前端爱好者</text>
      </svg>
    </div>
  </div>
</template>

<script></script>

<style lang="scss" scoped>
#logo {
  // background: url("../../assets/img/rainImg.jpg");
  position: absolute;
  background-size: 100vw 100vh;
  z-index: 9999999999999999999;
}
.container {
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.logo_text {
  font-size: 96px;
  fill: none;
  stroke: url(#geekColor);
  stroke-width: 1;
  stroke-dasharray: 10 800;
  stroke-dashoffset: 10;
  animation: drawing 1.3s linear 0s forwards;
}

@keyframes drawing {
  to {
    stroke-dasharray: 800;
    stroke-dashoffset: 0;
  }
}
// @media screen and (max-width: 765px) {
//   .logo_text{
//   font-size: 36px;
// }
// }
</style>
